package cqut.wys.dao.entity;

import java.util.ArrayList;
import java.util.List;

public class WfUserExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public WfUserExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserNameIsNull() {
            addCriterion("user_name is null");
            return (Criteria) this;
        }

        public Criteria andUserNameIsNotNull() {
            addCriterion("user_name is not null");
            return (Criteria) this;
        }

        public Criteria andUserNameEqualTo(String value) {
            addCriterion("user_name =", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotEqualTo(String value) {
            addCriterion("user_name <>", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameGreaterThan(String value) {
            addCriterion("user_name >", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameGreaterThanOrEqualTo(String value) {
            addCriterion("user_name >=", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLessThan(String value) {
            addCriterion("user_name <", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLessThanOrEqualTo(String value) {
            addCriterion("user_name <=", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLike(String value) {
            addCriterion("user_name like", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotLike(String value) {
            addCriterion("user_name not like", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameIn(List<String> values) {
            addCriterion("user_name in", values, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotIn(List<String> values) {
            addCriterion("user_name not in", values, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameBetween(String value1, String value2) {
            addCriterion("user_name between", value1, value2, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotBetween(String value1, String value2) {
            addCriterion("user_name not between", value1, value2, "userName");
            return (Criteria) this;
        }

        public Criteria andUserAddressIsNull() {
            addCriterion("user_address is null");
            return (Criteria) this;
        }

        public Criteria andUserAddressIsNotNull() {
            addCriterion("user_address is not null");
            return (Criteria) this;
        }

        public Criteria andUserAddressEqualTo(String value) {
            addCriterion("user_address =", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressNotEqualTo(String value) {
            addCriterion("user_address <>", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressGreaterThan(String value) {
            addCriterion("user_address >", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressGreaterThanOrEqualTo(String value) {
            addCriterion("user_address >=", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressLessThan(String value) {
            addCriterion("user_address <", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressLessThanOrEqualTo(String value) {
            addCriterion("user_address <=", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressLike(String value) {
            addCriterion("user_address like", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressNotLike(String value) {
            addCriterion("user_address not like", value, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressIn(List<String> values) {
            addCriterion("user_address in", values, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressNotIn(List<String> values) {
            addCriterion("user_address not in", values, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressBetween(String value1, String value2) {
            addCriterion("user_address between", value1, value2, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserAddressNotBetween(String value1, String value2) {
            addCriterion("user_address not between", value1, value2, "userAddress");
            return (Criteria) this;
        }

        public Criteria andUserVillageIsNull() {
            addCriterion("user_village is null");
            return (Criteria) this;
        }

        public Criteria andUserVillageIsNotNull() {
            addCriterion("user_village is not null");
            return (Criteria) this;
        }

        public Criteria andUserVillageEqualTo(Integer value) {
            addCriterion("user_village =", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageNotEqualTo(Integer value) {
            addCriterion("user_village <>", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageGreaterThan(Integer value) {
            addCriterion("user_village >", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_village >=", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageLessThan(Integer value) {
            addCriterion("user_village <", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageLessThanOrEqualTo(Integer value) {
            addCriterion("user_village <=", value, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageIn(List<Integer> values) {
            addCriterion("user_village in", values, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageNotIn(List<Integer> values) {
            addCriterion("user_village not in", values, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageBetween(Integer value1, Integer value2) {
            addCriterion("user_village between", value1, value2, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserVillageNotBetween(Integer value1, Integer value2) {
            addCriterion("user_village not between", value1, value2, "userVillage");
            return (Criteria) this;
        }

        public Criteria andUserGenderIsNull() {
            addCriterion("user_gender is null");
            return (Criteria) this;
        }

        public Criteria andUserGenderIsNotNull() {
            addCriterion("user_gender is not null");
            return (Criteria) this;
        }

        public Criteria andUserGenderEqualTo(Byte value) {
            addCriterion("user_gender =", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderNotEqualTo(Byte value) {
            addCriterion("user_gender <>", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderGreaterThan(Byte value) {
            addCriterion("user_gender >", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderGreaterThanOrEqualTo(Byte value) {
            addCriterion("user_gender >=", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderLessThan(Byte value) {
            addCriterion("user_gender <", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderLessThanOrEqualTo(Byte value) {
            addCriterion("user_gender <=", value, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderIn(List<Byte> values) {
            addCriterion("user_gender in", values, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderNotIn(List<Byte> values) {
            addCriterion("user_gender not in", values, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderBetween(Byte value1, Byte value2) {
            addCriterion("user_gender between", value1, value2, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserGenderNotBetween(Byte value1, Byte value2) {
            addCriterion("user_gender not between", value1, value2, "userGender");
            return (Criteria) this;
        }

        public Criteria andUserParentIdIsNull() {
            addCriterion("user_parent_id is null");
            return (Criteria) this;
        }

        public Criteria andUserParentIdIsNotNull() {
            addCriterion("user_parent_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserParentIdEqualTo(Integer value) {
            addCriterion("user_parent_id =", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdNotEqualTo(Integer value) {
            addCriterion("user_parent_id <>", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdGreaterThan(Integer value) {
            addCriterion("user_parent_id >", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_parent_id >=", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdLessThan(Integer value) {
            addCriterion("user_parent_id <", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_parent_id <=", value, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdIn(List<Integer> values) {
            addCriterion("user_parent_id in", values, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdNotIn(List<Integer> values) {
            addCriterion("user_parent_id not in", values, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdBetween(Integer value1, Integer value2) {
            addCriterion("user_parent_id between", value1, value2, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserParentIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_parent_id not between", value1, value2, "userParentId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdIsNull() {
            addCriterion("user_mate_id is null");
            return (Criteria) this;
        }

        public Criteria andUserMateIdIsNotNull() {
            addCriterion("user_mate_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserMateIdEqualTo(Integer value) {
            addCriterion("user_mate_id =", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdNotEqualTo(Integer value) {
            addCriterion("user_mate_id <>", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdGreaterThan(Integer value) {
            addCriterion("user_mate_id >", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_mate_id >=", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdLessThan(Integer value) {
            addCriterion("user_mate_id <", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_mate_id <=", value, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdIn(List<Integer> values) {
            addCriterion("user_mate_id in", values, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdNotIn(List<Integer> values) {
            addCriterion("user_mate_id not in", values, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdBetween(Integer value1, Integer value2) {
            addCriterion("user_mate_id between", value1, value2, "userMateId");
            return (Criteria) this;
        }

        public Criteria andUserMateIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_mate_id not between", value1, value2, "userMateId");
            return (Criteria) this;
        }

        public Criteria andIsDeletedIsNull() {
            addCriterion("is_deleted is null");
            return (Criteria) this;
        }

        public Criteria andIsDeletedIsNotNull() {
            addCriterion("is_deleted is not null");
            return (Criteria) this;
        }

        public Criteria andIsDeletedEqualTo(Byte value) {
            addCriterion("is_deleted =", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedNotEqualTo(Byte value) {
            addCriterion("is_deleted <>", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedGreaterThan(Byte value) {
            addCriterion("is_deleted >", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedGreaterThanOrEqualTo(Byte value) {
            addCriterion("is_deleted >=", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedLessThan(Byte value) {
            addCriterion("is_deleted <", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedLessThanOrEqualTo(Byte value) {
            addCriterion("is_deleted <=", value, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedIn(List<Byte> values) {
            addCriterion("is_deleted in", values, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedNotIn(List<Byte> values) {
            addCriterion("is_deleted not in", values, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedBetween(Byte value1, Byte value2) {
            addCriterion("is_deleted between", value1, value2, "isDeleted");
            return (Criteria) this;
        }

        public Criteria andIsDeletedNotBetween(Byte value1, Byte value2) {
            addCriterion("is_deleted not between", value1, value2, "isDeleted");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}